package org.piggy.test.web.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WebController {

    @GetMapping("/http-default/ping")
    public String ping() {
        return "ping";
    }


    @GetMapping("/http-default/pong")
    public String pong() {
        return "pong";
    }

    @PostMapping("/http-default/echo")
    public String echo(String echo) throws InterruptedException {
        Thread.sleep(2000);
        return echo;
    }
}
